//删除数组中的老六
var arr = [3,4,6,12,6,12,6,8,6,7,9,6];
for (let i = arr.length-1; i >=0; --i) {
    if(arr[i]==6){
        arr.splice(i,1);
    }
}
console.log(arr);